
<template>
    <rx-dialog @handOk="handleSubmit" @cancel="cancel">
        <rx-layout>
            <div slot="center">
                <a-form-model ref="form"  :model="mdl" :rules="rules" :label-col="labelCol" :wrapper-col="wrapperCol">
                                <a-form-model-item  :label="i18n('form.appId','应用ID')" prop = "appId">
                                        <a-input :placeholder="i18n('form.appId','应用ID','input')" v-model="mdl.appId"/>
                                </a-form-model-item>
                                <a-form-model-item  :label="i18n('form.deleted','逻辑删除')" prop = "deleted">
                                        <a-input-number :min="0" :max="1000000" :placeholder="i18n('form.deleted','逻辑删除','input')"
                                                        v-model="mdl.deleted"/>
                                </a-form-model-item>
                                <a-form-model-item  label="DOC_ID_" prop = "docId">
                                        <a-input :placeholder="$ti18('rxDecorator.input','请输入')+'DOC_ID_'" v-model="mdl.docId"/>
                                </a-form-model-item>
                                <a-form-model-item  label="EXT_NAME_" prop = "extName">
                                        <a-input :placeholder="$ti18('rxDecorator.input','请输入')+'EXT_NAME_'" v-model="mdl.extName"/>
                                </a-form-model-item>
                                <a-form-model-item  label="FILENAME_" prop = "filename">
                                        <a-input :placeholder="$ti18('rxDecorator.input','请输入')+'FILENAME_'" v-model="mdl.filename"/>
                                </a-form-model-item>
                                <a-form-model-item  label="IS_MAIN_" prop = "isMain">
                                        <a-input :placeholder="$ti18('rxDecorator.input','请输入')+'IS_MAIN_'" v-model="mdl.isMain"/>
                                </a-form-model-item>
                                <a-form-model-item  :label="i18n('form.isShare','是否共享')" prop = "isShare">
                                        <a-input :placeholder="i18n('form.isShare','是否共享','input')" v-model="mdl.isShare"/>
                                </a-form-model-item>
                                <a-form-model-item  label="KEY_" prop = "key">
                                        <a-input :placeholder="$ti18('rxDecorator.input','请输入')+'KEY_'" v-model="mdl.key"/>
                                </a-form-model-item>
                </a-form-model>


            </div>
        </rx-layout>
    </rx-dialog>
</template>
<script>
    import FormOnlyOfficeApi from '@/api/form/onlyoffice/formOnlyOffice'
    import {RxDialog,BaseFormModel} from "@lowcode/jpaas-common-lib";


    export default {
        name: 'FormOnlyOfficeEdit',
        mixins:[BaseFormModel],
        components: {
            RxDialog,
        },
        data(){
            return {
                /**
                 * 子表列表，以及表格属性
                 */
                subTable:{
        },
            rules: {
                appId: [{ required:false,message:this.i18n('form.appId','应用ID','input'), trigger: 'change' }],
                deleted: [{ required:false,message:this.i18n('form.deleted','逻辑删除','input'), trigger: 'change' }],
                docId: [{ required:false,message:this.$ti18('rxDecorator.input','请输入')+"DOC_ID_", trigger: 'change' }],
                extName: [{ required:false,message:this.$ti18('rxDecorator.input','请输入')+"EXT_NAME_", trigger: 'change' }],
                filename: [{ required:false,message:this.$ti18('rxDecorator.input','请输入')+"FILENAME_", trigger: 'change' }],
                isMain: [{ required:false,message:this.$ti18('rxDecorator.input','请输入')+"IS_MAIN_", trigger: 'change' }],
                isShare: [{ required:false,message:this.i18n('form.isShare','是否共享','input'), trigger: 'change' }],
                key: [{ required:false,message:this.$ti18('rxDecorator.input','请输入')+"KEY_", trigger: 'change' }],
            }
        }

        },
        methods: {
            i18n(name,text,key){
                return this.$ti18(name,text,"FormOnlyOffice",key);
            },
            get(id){
                return FormOnlyOfficeApi.get(id);
            },

            save(){
                return FormOnlyOfficeApi.save(this.mdl);
            },

        }
    }
</script>
<style>
    .relick a{
        margin-right: 10px;
    }

</style>
